{extend name="public:layout" /}
{block name="title"}添加品牌{/block}
{block name="head"}
{:widget('common/Form/icheckRes')}
{:widget('common/Form/ueditorRes')}
{:widget('common/Form/validRes')}
{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 品牌列表</a></li>
                <li class="active">添加品牌</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">品牌名称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入品牌名称"
                               name="brand_name" value="" datatype="*"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">绑定栏目</label>
                    <div class="col-sm-4">
                        <select multiple class="form-control" name="cids[]"  style="height:300px;">
                            {volist name="goodsCategory" id="vo"}
                            <option value="{$vo.cid}">{$vo._name}</option>
                            {/volist}
                        </select>
                        <p class="help-block">
                            按Crtl或Shife多选
                        </p>
                    </div>
                    <label class="col-sm-2 control-label Validform_label">品牌logo</label>
                    <div class="col-sm-4">
                        <p class="form-control-static">
                            {:widget('common/Form/singleImg',['brand_logo','',$utype])}
                        </p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">品牌关键词</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入品牌关键词"
                               name="brand_keywords" value="" />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">品牌链接</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入品牌链接"
                               name="brand_url" value="" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">品牌描述</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" name="brand_description" rows="3" placeholder="请输入品牌描述"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">品牌介绍</label>
                    <div class="col-sm-10">
                        {:widget('common/Form/ueditor',['field'=>'brand_content'])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">状态</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="brand_status" value="1" checked> 通过
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="brand_status" value="0"> 审核中
                        </label>
                    </div>
                    <label class="col-sm-2 control-label Validform_label">品牌排序</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control"
                               name="brand_sort" value="0" datatype="n" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary"
                                onclick="ajaxSubForm();" type="submit">
                            保存内容
                        </button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
    })
</script>
{/block}